<?php
session_start();
      if (isset($_SESSION['k_username'])) {
?>
<html>
<head>
<style type="text/css">
<!--
.Estilo1 {font-size: 24px}
-->
</style>
<link rel="stylesheet" href="style.css" type="text/css" />
<title >Editar Perfil</title>
</head>
<body>
<div id="round"><div id="container">
 <div id="content" class="column span-14">
<? include ("conexion.inc.php");
$link = Conectarse();
mysql_select_db("gotica_sociosgotica",$link);
$editadopor=$_SESSION['k_username'];
$result = mysql_query('SELECT * FROM usuarios WHERE usuario=\''.$editadopor.'\'');
if($row = mysql_fetch_array($result)){
echo"<form action=\"newpassword.php\" method=\"post\">";
echo "<table class=\"one\">";
echo "<tr>";
echo "<td>";
echo "Nuevo Password";
echo "</td>";
echo "<td>";
echo "<input type=\"password\" name=\"password\" value=\"".$row['password']."\" size=\"20\"  maxlength=\"20\" >";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Nombre";
echo "</td>";
echo "<td>";
echo "<input type=\"text\" name=\"nombre\" size=\"20\" maxlength=\"20\" value=\"".$row['descripcion']."\">";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Email";
echo "</td>";
echo "<td>";
echo "<input type=\"text\" name=\"email\" size=\"20\" maxlength=\"50\" value=\"".$row['email']."\">";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "Telefono";
echo "</td>";
echo "<td>";
echo "<input type=\"text\" name=\"telefono\" size=\"20\" maxlength=\"20\" value=\"".$row['telefono']."\">";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>";
echo "<input type=\"submit\" value=\"Cambiar\" name=\"cambiar\"  >";
echo "</td>";
echo "<td>";
echo "<input type=\"reset\" name=\"Borrar\" >";
echo "</td>";
echo "</tr>";
echo"</ form >";
}

?>
</table>
</div>
</div>
</div>
</body>
</html>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>